package be.gnx.fogo.application.dao;

import be.gnx.fogo.application.model.Firstname;

public class FirstnameDao extends ObjectDao<Firstname, String> {

  public FirstnameDao() {
    super(Firstname.class, "value");
  }

  public Firstname findOrCreate(String value) {
    Firstname firstname = get(value);
    if (firstname == null) {
      firstname = new Firstname();
      firstname.setValue(value);
      save(firstname);
    }
    return firstname;
  }

}
